package org.particlethink.response;

import io.swagger.v3.oas.annotations.media.Schema;
import org.particlethink.entry.OrderStatus;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

public class OrderStatusResponse {

    @Schema(description = "状态列表")
    private List<Status> statusList;

    public List<Status> getStatusList() {
        return statusList;
    }

    public void setStatusList(List<Status> statusList) {
        this.statusList = statusList;
    }

    public static class Status{
        // 状态
        @Schema(description = "状态")
        private OrderStatus status;
        // 处理人
        @Schema(description = "处理人")
        private String handleUsername;
        @Schema(description = "处理时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date handleTime;
        @Schema(description = "处理意见")
        private String content;
        private boolean selected;

        public Status() {
        }

        public Status(OrderStatus status, String handleUsername, Date handleTime, String content) {
            this.status = status;
            this.handleUsername = handleUsername;
            this.handleTime = handleTime;
            this.content = content;
        }

        public Status(OrderStatus status, String handleUsername, Date handleTime, String content, boolean selected) {
            this.status = status;
            this.handleUsername = handleUsername;
            this.handleTime = handleTime;
            this.content = content;
            this.selected = selected;
        }

        public boolean isSelected() {
            return selected;
        }

        public void setSelected(boolean selected) {
            this.selected = selected;
        }

        public OrderStatus getStatus() {
            return status;
        }

        public void setStatus(OrderStatus status) {
            this.status = status;
        }

        public String getHandleUsername() {
            return handleUsername;
        }

        public void setHandleUsername(String handleUsername) {
            this.handleUsername = handleUsername;
        }

        public Date getHandleTime() {
            return handleTime;
        }

        public void setHandleTime(Date handleTime) {
            this.handleTime = handleTime;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }
    }
}
